package com.dream.song.springevent;

import com.dream.song.springevent.event.DemoEvent;
import org.springframework.stereotype.Component;

/**
 * @author song_
 * @Date 2020/3/16
 * @desc
 **/
@Component
public class EventListener  {

    @org.springframework.context.event.EventListener(value = DemoEvent.class)
    public void sendMessage(DemoEvent event){
        System.out.println("received message ....");
        System.out.println(event.getMessage());
    }

}
